<template>
  <div>
    <h3>v-model</h3>
    <h4>{{ value }}</h4>
    <el-button @click="btnClick">修改value</el-button>
  </div>
</template>
<script>
export default {
  model: {
    prop: 'value',
    event: 'change'
  },
  props: {
    value: {
      type: Number,
      required: true
    }
  },
  methods: {
    btnClick() {
      this.$emit('change', this.value + 1)
    }
  }
}
</script>
<style></style>
